package com.shen.demo.demos.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shen.demo.demos.web.domain.entry.UserName;
import com.shen.demo.demos.web.mapper.UserNameMapper;
import com.shen.demo.demos.web.service.UserNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class UserNameServiceImpl extends ServiceImpl<UserNameMapper, UserName> implements UserNameService {
    @Autowired
    private UserNameMapper userNameMapper;
    @Override
    public Optional<UserName> getById(Integer id) {
        return Optional.ofNullable(userNameMapper.selectById(id));
    }
}
